-- GENERATED SPELL FOR [Borer Beetle] --


function spell0_8932(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(6016,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8932', 20000, 1)
end

function spell1_8932(pUnit, Event) --@Putrid Enzyme,Self--
pUnit:FullCastSpellOnTarget(14539,pUnit)
pUnit:RegisterEvent('Sorts_8932', 545, 1)
end

function Sorts_8932(pUnit, Event)
local choix_sorts_8932 = math.random(0, 1)
if choix_sorts_8932 == 0 then
pUnit:RegisterEvent('spell0_8932', 1, 1)
end
if choix_sorts_8932 == 1 then
pUnit:RegisterEvent('spell1_8932', 1, 1)
end
end

function mob8932_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8932', math.random(1500, 3000), 1)
end

function mob8932_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8932_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8932_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8932, 1, 'mob8932_Action')
RegisterUnitEvent(8932, 2, 'mob8932_Leave')
RegisterUnitEvent(8932, 3, 'mob8932_Kill')
RegisterUnitEvent(8932, 4, 'mob8932_Die')
